<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>Guess Number Game</title>
</head>
<body>
<h1>系统随机生成一个1到100之间的数</h1>
<h1>请在下面的文本框中输入你猜的数</h1>
<form action="process" method="post">
    输入猜的数字:
    <input type="number" name="userGuess" required min="1" max="100">
    <input type="submit" value="提交">
</form>
<%
    String result = (String) request.getAttribute("result");
    if (result != null && !result.isEmpty()) {
%>
<p><%= result %></p>
<%
    }
%>
</body>
</html>
